package org.jeecg.modules.wmhb.service;

import org.jeecg.modules.wmhb.entity.PurchaseBom;
import org.jeecg.modules.wmhb.entity.WmPurchaseTaskbookBom;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.wmhb.entity.WmTask;
import org.jeecg.modules.wmhb.entity.WmTaskBom;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: 采购任务书BOM
 * @Author: jeecg-boot
 * @Date:   2024-08-31
 * @Version: V1.0
 */
public interface IWmPurchaseTaskbookBomService extends IService<WmPurchaseTaskbookBom> {
    /**
     * 新增采购BOM
     * @param purchaseBom
     * @param wmTask
     */
    public void importWmPurchaseTaskbookBom(PurchaseBom purchaseBom, WmTask wmTask);

    /**
     * 修改采购BOM
     * @param purchaseBom
     * @param wmTask
     */
    public void updateWmPurchaseTaskbookBom(PurchaseBom purchaseBom, WmTask wmTask);

    /**
     *
     * 将任务书的BON批量到货
     */
    public void purchaseByTask(String wmTaskId);

    /**
     *
     * 任务采购BOM已采购
     */
    public void arriveByTask(String wmTaskId);

    /**
     * 通过任务ID查询所有的采购BOM
     */
    public List<WmPurchaseTaskbookBom> listByWmTaskId(String wmTaskId);

    /**
     * 通过任务书ID查询所有的采购BOM
     */
    public List<WmPurchaseTaskbookBom> listByWmTaskbookId(String wmTaskbookId);

    /**
     * 通过任务ID列表查询所有的采购BOM
     */
    public List<WmPurchaseTaskbookBom> listByWmTaskIdAndStartEnd(String wmTaskId, String firstDayOfMonth, String lastDayOfMonth);

    /**
     * 导出采购BOM单
     * @param request
     * @param wmPurchaseTaskbookBomList
     * @return
     */
    public ModelAndView exportBomExcel(HttpServletRequest request, List<WmPurchaseTaskbookBom> wmPurchaseTaskbookBomList);

    /**
     * 判断导入的BOM是否存在
     */
    public List<WmPurchaseTaskbookBom> isBomExist(PurchaseBom purchaseBom, WmTask wmTask);

    /**
     * 查询所有的没有到货采购BOM
     */
    public List<WmPurchaseTaskbookBom> queryNotArriveBom();
}
